<div id="viewer-container"></div>
<script>
  let viewer = undefined
  function initViewer() {
    viewer = new DC.Viewer('viewer-container')
    let baselayer = DC.ImageryLayerFactory.createGoogleImageryLayer({
      style: 'img'
    })
    viewer.addBaseLayer(baselayer)
    viewer.on(DC.SceneEventType.PRE_RENDER, e => {
      console.log(e)
    })
  }
  DC.ready(initViewer)
</script>
